package com.ruoyi.customerSample.service.impl;

import com.ruoyi.customerSample.domain.ContractBasicInfo;
import com.ruoyi.customerSample.mapper.ContractBasicInfoMapper;
import com.ruoyi.customerSample.service.IContractBasicInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * 检测合同基本信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-05-12
 */
@Service
public class ContractBasicInfoServiceImpl implements IContractBasicInfoService
{
    @Autowired(required = false)
    private ContractBasicInfoMapper contractBasicInfoMapper;

    /**
     * 查询检测合同基本信息
     * 
     * @param id 检测合同基本信息ID
     * @return 检测合同基本信息
     */
    @Override
    public ContractBasicInfo selectContractBasicInfoById(String id)
    {
        return contractBasicInfoMapper.selectContractBasicInfoById(id);
    }

    /**
     * 合同编号查询基本内容
     * @param contractNum
     * @return
     */
    @Override
    public ContractBasicInfo selectContractBasicInfoByNum(String contractNum) {
        return contractBasicInfoMapper.selectContractBasicInfoByNum(contractNum);
    }

    /**
     * 查询检测合同基本信息列表
     * 
     * @param contractBasicInfo 检测合同基本信息
     * @return 检测合同基本信息
     */
    @Override
    public List<ContractBasicInfo> selectContractBasicInfoList(ContractBasicInfo contractBasicInfo)
    {
        return contractBasicInfoMapper.selectContractBasicInfoList(contractBasicInfo);
    }

    /**
     * 新增检测合同基本信息
     * 
     * @param contractBasicInfo 检测合同基本信息
     * @return 结果
     */
    @Override
    public int insertContractBasicInfo(ContractBasicInfo contractBasicInfo)
    {
        return contractBasicInfoMapper.insertContractBasicInfo(contractBasicInfo);
    }

    /**
     * 修改检测合同基本信息
     * 
     * @param contractBasicInfo 检测合同基本信息
     * @return 结果
     */
    @Override
    public int updateContractBasicInfo(ContractBasicInfo contractBasicInfo)
    {
        return contractBasicInfoMapper.updateContractBasicInfo(contractBasicInfo);
    }

    /**
     * 批量删除检测合同基本信息
     * 
     * @param ids 需要删除的检测合同基本信息ID
     * @return 结果
     */
    @Override
    public int deleteContractBasicInfoByIds(String[] ids)
    {
        return contractBasicInfoMapper.deleteContractBasicInfoByIds(ids);
    }

    /**
     * 删除检测合同基本信息信息
     * 
     * @param id 检测合同基本信息ID
     * @return 结果
     */
    @Override
    public int deleteContractBasicInfoById(String id)
    {
        return contractBasicInfoMapper.deleteContractBasicInfoById(id);
    }
}
